<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">


    <!-- 地址栏显示 -->
    <link rel="Shortcut Icon" href="/static/images/hospital.ico" type="image/x-icon"/>
    <!-- 收藏栏也显示 -->
    <link rel="Bookmark" href="/static/images/hospital.ico" type="image/x-icon"/>

    <link href="/static/sb-admin-2/vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <!--    <link th:href="@{https://fonts.loli.net/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i}"
              rel="stylesheet">-->

    <!-- Custom styles for this template-->
    <link href="/static/sb-admin-2/css/sb-admin-2.css" rel="stylesheet">

    <link href="/static/sb-admin-2/bootstrap/bootstrap-table.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/static/csss/sweetalert.css">


    <title>体检收费</title>
    <link rel="stylesheet" type="text/css" href="/static/csss/mcss/mcss_examinationTollInfo.css"/>
    <link rel="stylesheet" type="text/css" href="/static/csss/chosen.min.css"/>
    <link type="text/css" rel="stylesheet" href="/static/csss/preloader.css">
</head>
<body>
<!--正文-->
<div>
    <div class="card shadow mb-4" style="margin-left: 2.5%;height: 818px;">

        <div class="card-header py-3">
            <h6 class="m-0 font-weight-bold text-primary">体检收费</h6>
        </div>

        <div class="card-body">
            <div style=" margin-left: 1%;margin-right: 1%">

                <div class="card mycard">

                    <div style="margin-left: 5%">
                        <div class="textbox">
                            卡号<input type="text" style="width: 140px" id="cardId">
                            <div class="cardId-search">
                                <button class="btn btn-success" onclick="getCardIdIn(1)">
                                    <img class="png" src="/static/images/icon/search.png">
                                </button>
                            </div>
                        </div>
                    </div>

                    <div class="textbox_2">
                        姓名<input type="text" id="name" style="width: 120px" readonly="readonly">&emsp;
                        性别<input type="text" id="sex" style="width: 90px" readonly="readonly">&emsp;
                        民族<input type="text" id="nationality" style="width: 90px" readonly="readonly">&emsp;
                        年龄<input type="text" id="age" style="width:100px" readonly="readonly">
                        <input type="text" id="queueId" hidden="hidden"><!--隐藏队列Id-->

                    </div>

                    <div class="card-header py-3">
                        <h6 class="m-0 font-weight-bold text-primary">检查结果</h6>
                    </div>

                    <div class="textbox_2">
                        体温<input type="text" id="bodyTemperature" style="width: 70px" readonly="readonly">℃&emsp;
                        脉搏<input type="text" id="pulse" style="width: 70px" readonly="readonly">次/分&emsp;
                        心率<input type="text" id="heartRate" style="width: 70px" readonly="readonly">次/分&emsp;
                        血压<input type="text" id="bloodPressure" style="width: 70px" readonly="readonly">mmHg
                        <br><br>
                        处方号<input type="text" id="prescriptionNum" style="width: 170px" readonly="readonly">
                        <input type="text" id="registerId" hidden="hidden">
                    </div>

                    <div class="card-header py-3">
                        <h6 class="m-0 font-weight-bold text-primary">收费</h6>
                    </div>

                    <div class="textbox_2">

                        费用<input type="text" id="examinationCost" style="width: 70px" readonly="readonly">元
                        &emsp;&emsp;
                        <div style="display: inline-block">
                            付款方式<select class='payType' data-placeholder=' '>

                            <option value=""></option>

                            <option value="现金">现金</option>

                            <option value="支付宝">支付宝</option>

                        </select>
                        </div>
                    </div>

                    <div style="display: flex">
                        <div style="width: 60%;margin:3% 0 0 5%">
                            <div id="money" style="display: none">
                                实付<input type="text" id="payMoney" style="width: 120px"
                                         oninput="getChange()">元&emsp;&emsp;&emsp;
                                找零<input type="text" id="Change" style="width: 100px;color: red"
                                         readonly="readonly">元
                            </div>

                            <div id="apay" style="display: none;margin-left: 40%">
                                <img style="width: 100px;height: 100px;"
                                     src="/static/images/icon/apay.jpg">
                            </div>
                        </div>

                        <div style="margin:5% 0 0 8%">
                            <button class="btn btn-info mybutton2" onclick="saveExaminationTollInfo()">
                                提交信息
                            </button>
                        </div>
                    </div>

                </div>

            </div>

        </div>
    </div>
</div>
<div>
    <div>

        <script type="text/javascript" src="/static/sb-admin-2/vendor/jquery/jquery.min.js"></script>

        <script type="text/javascript" src="/static/sb-admin-2/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

        <!-- Core plugin JavaScript-->
        <script type="text/javascript" src="/static/sb-admin-2/vendor/jquery-easing/jquery.easing.min.js"></script>

        <!-- Custom scripts for all pages-->
        <script type="text/javascript" src="/static/sb-admin-2/js/sb-admin-2.min.js"></script>
        <script type="text/javascript" src="/static/jss/sweetalert-dev.js"></script>
    </div>
    <script type="text/javascript" src="/static/jss/jquery.preloader.min.js"></script>
    <script type="text/javascript" src="/static/jss/chosen.jquery.min.js"></script>
    <script src="/static/sb-admin-2/bootstrap/bootstrap-table.min.js"></script>
    <script src="/static/sb-admin-2/bootstrap/bootstrap-table-zh-CN.js"></script>
    <script type="text/javascript" src="/static/jss/mjs/mjs_examinationTollInfo.js"></script>
</div>
</body>
<script src="/static/js/jquery-3.3.1.js"></script>
<script src="/static/layui/layui.js"></script>
<script src="/static/sb-admin-2/vendor/jquery/jquery.min.js"></script>
<script>
    <!--查询卡号获取患者基础信息-->
    function getCardIdIn(command) {
        // var GetCardIdInforReqVO = {
        // command: command, //0:表示读卡器输入卡号 1:表示手动输入卡号
        var cardId = $("#cardId").val()
        // };
        $.ajax({
            url: "/patient/findById",
            type: "post",
            dataType: "json",
            data: {card_id:cardId},
            success: function (da) {
                console.log(da);
                if (da.code == 200) {
                    $("#cardId").val(da.date.card_id);
                    $("#name").val(da.date.name);
                    $("#sex").val(da.date.sex);
                    $("#nationality").val(da.date.nationality);
                    //da.date.age年龄时间计算
                    $("#age").val(30);
                    //  $("#prescriptionNum").val(date.prescriptionNum);
                    //   $("#date").val(date.date);
                    //   $("#department").val(date.department);

                    if (da.date.marital_status == null || da.date.career == null || da.date.personal_history == null || da.date.past_history == null || da.date.family_history == null) {
                        $("#new-img").css("visibility", "visible");

                    }
                    $("#maritalstatus").val(da.date.marital_status);
                    $("#career").val(da.date.career);
                    $("#personalHistory").val(da.date.personal_history);
                    $("#pastHistory").val(da.date.past_history);
                    $("#familyHistory").val(da.date.family_history);

                    // $("#queueId").val(date.queueId);

                } else {
                    swal(da.date.msg, "", "error")
                }
            }
        })
    };
</script>
</html>